package project;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import java.awt.Dimension;
import java.awt.Color;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Main extends JFrame {

	private JPanel contentPane;

	
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Main frame = new Main();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	
	public Main() {
		setBackground(new Color(100, 149, 237));
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(275, 100, 750, 550);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblWelcome = new JLabel("Indraprashtha Institute of Information Technology\r\n");
		lblWelcome.setHorizontalAlignment(SwingConstants.CENTER);
		lblWelcome.setFont(new Font("Tahoma", Font.BOLD, 18));
		lblWelcome.setBounds(10, 90, 714, 36);
		contentPane.add(lblWelcome);
		
		JLabel lblWelcome_1 = new JLabel("Welcome ");
		lblWelcome_1.setFont(new Font("Tahoma", Font.BOLD, 18));
		lblWelcome_1.setHorizontalAlignment(SwingConstants.CENTER);
		lblWelcome_1.setBounds(206, 12, 314, 46);
		contentPane.add(lblWelcome_1);
		
		JLabel lblOnlineAdmissionTest = new JLabel("Online Admission Testing System (OATS)");
		lblOnlineAdmissionTest.setFont(new Font("Tahoma", Font.BOLD, 18));
		lblOnlineAdmissionTest.setHorizontalAlignment(SwingConstants.CENTER);
		lblOnlineAdmissionTest.setBounds(10, 137, 714, 46);
		contentPane.add(lblOnlineAdmissionTest);
		
		JTextArea txtrIndraprasthaInstituteOf = new JTextArea();
		txtrIndraprasthaInstituteOf.setForeground(new Color(0, 0, 0));
		txtrIndraprasthaInstituteOf.setEditable(false);
		txtrIndraprasthaInstituteOf.setBackground(UIManager.getColor("Button.background"));
		txtrIndraprasthaInstituteOf.setFont(new Font("Calibri", Font.PLAIN, 16));
		txtrIndraprasthaInstituteOf.setWrapStyleWord(true);
		txtrIndraprasthaInstituteOf.setLineWrap(true);
		txtrIndraprasthaInstituteOf.setText("Indraprastha Institute of Information Technology, Delhi (aka. IIIT-Delhi or IIIT-D) was created as a State University by an act of Delhi Government (The IIIT Delhi Act, 2007) empowering it to do research and development and grant degrees.\r\n\r\nThe institute began with its first batch of 60 BTech students in 2008. Since then, it has come a long way with nearly 20 faculties specializing in diverse areas of Computer Science, and nearly 250 students consisting of 3 batches of BTech, 1 batch of MTech and 2 batches of PhD. In a relatively short time, it has earned a good reputation in India and abroad for being a center of quality education and research in IT. AICTE has recongnised us as an Institute of National Importance, along with other IIITs.");
		txtrIndraprasthaInstituteOf.setRows(8);
		txtrIndraprasthaInstituteOf.setBounds(10, 225, 714, 220);
		contentPane.add(txtrIndraprasthaInstituteOf);
		
		JButton btnLogin = new JButton("LOGIN");
		btnLogin.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				
				btnLoginActionPerformed(evt);
				
			}
		});
		btnLogin.setFont(new Font("Tahoma", Font.BOLD, 12));
		btnLogin.setBounds(319, 456, 89, 23);
		contentPane.add(btnLogin);
		
		JLabel lblTo = new JLabel("To");
		lblTo.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
		lblTo.setHorizontalAlignment(SwingConstants.CENTER);
		lblTo.setBounds(319, 57, 89, 21);
		contentPane.add(lblTo);
	}
	private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {
	
		Student_Login slobj = new Student_Login();
		slobj.frame.setVisible(true);
		this.setVisible(false);
					
	}
	
	}

